package br.com.j7.jdesk.persistence.repository.impl;

import java.util.List;

import br.com.j7.jdesk.library.exception.RepositoryException;
import br.com.j7.jdesk.persistence.entity.ServicesAnnotations;
import br.com.j7.jdesk.persistence.repository.ServiceAnnotationRepository;

/**
 * 
 * 
 * 
 * @author Edivando Alves
 *
 */
public class ServiceAnnotationRepositoryImpl extends AbstractRepository<ServicesAnnotations> implements ServiceAnnotationRepository {

	/*
	 * (non-Javadoc)
	 * @see br.com.j7.jdesk.persistence.repository.impl.AbstractRepository#find(java.lang.Integer)
	 */
	@Override
	public ServicesAnnotations find( Integer id ) throws RepositoryException {
		try {
			return getEntity( ServicesAnnotations.class, id );
		} catch (RepositoryException e) {
			throw new RepositoryException(e);
		}
	}

	/*
	 * (non-Javadoc)
	 * @see br.com.j7.jdesk.persistence.repository.impl.AbstractRepository#list()
	 */
	@Override
	public List<ServicesAnnotations> list() throws RepositoryException {
		try {
			return listByNamedQuery( ServicesAnnotations.class, "" );
		} catch (RepositoryException e) {
			throw new RepositoryException(e);
		}
	}
}
